package uit.edu.vn.portal.elearning.utils;

import javax.portlet.RenderRequest;

import com.liferay.portal.kernel.util.WebKeys;
import com.liferay.portal.theme.ThemeDisplay;

public class Utils {
	public static String getAuthenUsername(RenderRequest renderRequest){
		ThemeDisplay _theme = (ThemeDisplay)renderRequest.getAttribute(WebKeys.THEME_DISPLAY);
		return _theme.getUser().getScreenName();
	}
	
	public static String generateSiteId() {
		return "site-" + Math.floor(Math.random()*100000);
	}
}
